.\" Copyright (c) 2017, Martin Kepplinger <martink@posteo.de>
.\"
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, see
.\" <http://www.gnu.org/licenses/>.
.\" %%%LICENSE_END
.\"
.TH TS_LIBVERSION 3  "" "" "tslib"
.SH NAME
ts_libversion \- get version information on the currently running tslib
.SH SYNOPSIS
.nf
.B #include <tslib.h>
.sp
.BI "struct ts_lib_version_data *ts_libversion();"
.sp
.fi

.SH DESCRIPTION
.BR ts_libversion ()
This function returns a pointer to a static copy of the version info struct:

.nf
struct ts_lib_version_data {
        const char      *package_version;
        int             version_num;
        unsigned int    features;
};
.fi

.BR package_version
is just the string containing the tarball release number, e.g. "1.10".

.BR version_num
is a 24 bit number created like this: <8 bits major number> | <8 bits minor number> | <8 bits patch number> of the library libts. Version 0.7.1 is therefore returned as 0x000701.

.BR features
can have one or more bits set. The currently defined bits are:
.RS 4
.BR TSLIB_VERSION_MT
tslib filters support multitouch ts_read_mt() and there is at least one raw access module supporting it (currently evdev input)
.BR TSLIB_VERSION_OPEN_RESTRICTED
ts_open_restricted and ts_close_restricted function pointers are available to implement
.BR TSLIB_VERSION_EVENTPATH
ts_get_eventpath() is available since tslib can auto-detect a device
.BR TSLIB_VERSION_VERSION
simple tslib_version() and ts_print_ascii_logo() are available
.RE
.SH RETURN VALUE
This function returns a pointer to a static copy of the version info struct.

.SH SEE ALSO
.BR ts_setup (3),
.BR ts_read (3),
.BR ts.conf (5)
